package com.huffman.smart_picture.common.exception;

import lombok.Getter;

/**
 * @author DengLin
 * @title 错误枚举
 * @date 2024/06/27
 */
@Getter
public enum ErrorEnum {

    PARAM_EMPTY(40000, "请求参数为空", ""),

    PARAM_ILLICIT(40001, "请求参数非法", ""),

    PARAM_CHECK_MISTAKE(40002, "请求参数验证错误", ""),

    REQUEST_PARAM_EMPTY(40003, "请求参数为空", ""),

    FILE_TYPE_ERROR(40004, "文件类型错误", ""),

    UPLOAD_FILE_EMPTY(40005, "文件为空", ""),

    UPLOAD_FILE_OVERSIZE(40005, "文件过大", ""),

    USER_LOGIN_FAIL(40100, "登录失败", ""),
    AUTHENTICATION_FAIL(40101, "认证出错", ""),
    NO_AUTH(40102, "没权限", ""),

    RESOURCE_SURPLUS_ZERO(403, "资源已上限", ""),
    CHECK_INFO_EXPIRED(40401, "查询失败", ""),
    RESOURCE_NOT_FIND(40402, "资源不存在", ""),
    USER_REGISTER_FAIL(40901, "注册失败", ""),
    REQUEST_MANY(42901, "频繁操作", ""),
    SYSTEM_ERROR(50000, "系统错误", "");
    private final Integer code;

    private final String message;

    private final String description;

    ErrorEnum(Integer code, String message, String description) {
        this.code = code;
        this.message = message;
        this.description = description;
    }
}